/****************************************************************************
 *
 *  VSTRING Library
 *  1998-2014 (c) Vladi Belperchinov-Shabanski "Cade"
 *  <cade@bis.bg> <cade@biscom.net> <cade@datamax.bg> <cade@cpan.org>
 *  http://cade.datamax.bg/away/vstring/
 *  Distributed under the GPL license, you should receive copy of GPL!
 *
 *  SEE `README',`LICENSE' OR `COPYING' FILE FOR LICENSE AND OTHER DETAILS!
 *
 ****************************************************************************/

#include <stdio.h>
#include <iostream>
#include "vstring.h"
using namespace std;
//#include "test.cpp"

void test1();
void test2();
void test3();
void test4();
void test5();
void test6();
void test7();
void test8();
int main( int argc, char* argv[] )
{
  char t[92] = "this is simple test";
  char r[92] = "1111111111111111111";
  str_word( t, " ", r );
  cout << t << endl;
  cout << r << endl;
  ASSERT( strcmp( t, "is simple test" ) == 0 );
  ASSERT( strcmp( r, "this" ) == 0 );

  strcpy( t, "   opa" );
  str_cut_left( t, " " );
  ASSERT( strcmp( t, "opa" ) == 0 );

  strcpy( t, "opa   " );
  str_cut_right( t, " " );
  ASSERT( strcmp( t, "opa" ) == 0 );

  strcpy( t, "this is good" );
  str_ins( t, 8, "not " );
  ASSERT( strcmp( t, "this is not good" ) == 0 );

  str_del( t, 8, 4 );
  ASSERT( strcmp( t, "this is good" ) == 0 );

  strcpy( t, "more" );
  str_mul( t, 3 );
  ASSERT( strcmp( t, "moremoremore" ) == 0 );

  str_copy( t+10, t,    0, 15 ); // check for overlapping borders, begin of str
  str_copy( t+10, t+20, 0, 15 ); // check for overlapping borders, end   of str

  strcpy( t, "despicable me" );
  str_word( t, " ", r );
  ASSERT( strcmp( r, "despicable" ) == 0 );
  str_word( t, " ", r );
  ASSERT( strcmp( r, "me" ) == 0 );
  ASSERT( t[0] == 0 );

  printf("HelloWorld\n");

  test3();
  VTrieNode vt;
  VTrieNode *test = vt.find_node("hello",1);


//  test1();
//  test2();
//  test3();
//  test4();
//  test5();
//  test6();
//  test7();
  //*/
  return 0;
}

